﻿Imports Mystery



Public Class EasyProgress
    Implements IClientProgress

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub


    Public Sub close1() Implements IClientProgress.close
        Me.Dispatcher.Invoke(Sub() Me.Visibility = Windows.Visibility.Hidden)
    End Sub

    Public Property message As String Implements IClientProgress.message
        Get
            Return Me.lMessage.Content
        End Get
        Set(value As String)
            Me.Dispatcher.Invoke(Sub() Me.lMessage.Content = value)
        End Set
    End Property

    Public Property progress As Double Implements IClientProgress.progress
        Get
            Return Me.pBar.Value
        End Get
        Set(value As Double)
            Me.Dispatcher.Invoke(Sub()
                                     Me.pBar.Value = value
                                     Me.UpdateLayout()
                                 End Sub)
        End Set
    End Property

    Public Sub show1() Implements IClientProgress.show
        Me.Dispatcher.Invoke(Sub() Me.Visibility = Windows.Visibility.Visible)
    End Sub

    Private Sub Window_Closing(sender As System.Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        e.Cancel = True
    End Sub
End Class
